package com.github.davidfantasy.mybatisplus.generatorui.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.util.List;


@Data
public class AstInfo {

    private Mapper mapper;
    private ResultMapper resultMapper;
    private Select select;
    private List<Beans> beans;

    @Data
    public static class Mapper {

        private String type;

        private String method;

        @JsonProperty("import")
        private List<String> imports;

        private String packageName;

    }

    @Data
    public static class ResultMapper {

        private String method;
        private String bean;
        private List<String> fields;
    }

    @Data
    public static class Select {

        private String method;
        private String sql;

    }

    @Data
    public static class Beans {

        @JsonProperty("import")
        private List<String> imports;
        private String className;
        private String packageName;
        private List<Fields> fields;

    }

    @Data
    public static class Fields {

        private String name;
        private String type;
        private String desc;
        private String importPackage;

    }

}
